home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / file / managers / mc-3.2 / mc-3 / mc-3.2.1 / src / ncurses.patch < prev    next >
Encoding:
Text File  |  1996-05-17  |  630 b   |  20 lines

  1. This patch was written by Janne Kukonlehto  (jtklehto@stekt.oulu.fi),
  2. it adds 8 bit clean support to ncurses 1.8.5
  3.  
  4. --- ncurses-1.8.5/src/lib_addch.c.old    Sun Oct 30 21:03:08 1994
  5. +++ ncurses-1.8.5/src/lib_addch.c    Sun Oct 30 21:04:59 1994
  6. @@ -32,6 +32,13 @@
  7.      if (y > win->_maxy  ||  x > win->_maxx  ||  y < 0  ||  x < 0)
  8.          return(ERR);
  9.  
  10. +    /* Attempt to solve problems caused by
  11. +       sign-extension of eighth bit 
  12. +       (this should make ncurses 8-bit clean) */
  13. +    if ((ch & A_ATTRIBUTES) == A_ATTRIBUTES){
  14. +        ch &= A_CHARTEXT;
  15. +    }
  16. +
  17.      switch (ch&A_CHARTEXT) {
  18.          case '\t':
  19.          for (newx = x + (8 - (x & 07)); x < newx; x++)
  20.